using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using Yoozoo.UI;
public class DropdownBinderTreeItem : BindingBinderTreeItemBase
{
    public static Dictionary<DropdownBinder.AttributeType, LinkerValueState> AttributeValueDic = new Dictionary<DropdownBinder.AttributeType, LinkerValueState>
    {
        {DropdownBinder.AttributeType.onValueChanged, LinkerValueState.UnityEventInt32},
        {DropdownBinder.AttributeType.alphaFadeSpeed, LinkerValueState.Single},
        {DropdownBinder.AttributeType.value, LinkerValueState.Int32},
        {DropdownBinder.AttributeType.interactable, LinkerValueState.Boolean},
        {DropdownBinder.AttributeType.enabled, LinkerValueState.Boolean},
    };
    public DropdownBinderTreeItem() : base(typeof(DropdownBinder))
    {
    }
    
    public override void RebuildTree()
    {
        base.RebuildTree();
        foreach (DropdownBinder.AttributeType binderType in Enum.GetValues(typeof(DropdownBinder.AttributeType)))
        {
            BindingLinkerTreeItem linkerTreeItem = new BindingLinkerTreeItem(binderType.ToString(), binderType.ToString(), (int)AttributeValueDic[binderType]);
            AddChild(linkerTreeItem);
        }
    }
}